chore: Dependency bumps#446
Open
sbernauer wants to merge 5 commits into
Open
Conversation
NickLarsenNZ
approved these changes
Jul 16, 2026
NickLarsenNZ
left a comment
Member
There was a problem hiding this comment.
LGTM, a few comments, no blockers.
| pub fn bcrypt(kwargs: Kwargs, _: &State) -> TeraResult<String> { | ||
| let password = kwargs.must_get::<String>("password")?; | ||
| bcrypt::hash(password, DEFAULT_COST) | ||
| .map_err(|err| tera::Error::message(format!("Failed to create bcrypt hash: {err}"))) |
Member
There was a problem hiding this comment.
Why don't we use .context()?
Member
Author
There was a problem hiding this comment.
It's not a snafu error (it's tera::Error)
bcrypt::hash(password, DEFAULT_COST)
.with_context(|err| tera::Error::message(format!("Failed to create bcrypt hash: {err}")))causes
error[E0277]: the trait bound `tera::Error: IntoError<_>` is not satisfied
--> rust/stackable-cockpit/src/utils/templating.rs:37:10
|
37 | .with_context(|err| tera::Error::message(format!("Failed to create bcrypt hash: {err}")))
| ^^^^^^^^^^^^ the trait `IntoError<_>` is not implemented for `tera::Error`
|
note: there are multiple different versions of crate `snafu` in the dependency graph
--> /home/sbernauer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/snafu-0.9.1/src/lib.rs:1300:1
|
1300 | pub trait IntoError<E>
| ^^^^^^^^^^^^^^^^^^^^^^ this is the expected trait
|
::: /home/sbernauer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/snafu-0.8.9/src/lib.rs:1321:1
|
1321 | pub trait IntoError<E>
| ---------------------- this is the trait that was imported
|
::: /home/sbernauer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/snafu-0.6.10/src/lib.rs:584:1
|
584 | pub trait IntoError<E>
| ---------------------- this is the trait that was imported
= help: you can use `cargo tree` to explore your dependency tree
= help: the following other types implement trait `IntoError<E>`:
InvalidLabelValueSnafu
InvalidRegexSnafu
InvalidRfc1035LabelNameSnafu
InvalidRfc1123DnsSubdomainNameSnafu
InvalidRfc1123LabelNameSnafu
InvalidUidSnafu
LengthExceededSnafu<__T0, __T1>
MinimumLengthNotMetSnafu<__T0, __T1>
RegexNotMatchedSnafu<__T0, __T1>
note: required by a bound in `snafu::ResultExt::with_context`
--> /home/sbernauer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/snafu-0.9.1/src/lib.rs:675:12
|
672 | fn with_context<F, C, E2>(self, context: F) -> Result<T, E2>
| ------------ required by a bound in this associated function
...
675 | C: IntoError<E2, Source = E>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ResultExt::with_context`
error[E0277]: the trait bound `tera::Error: ErrorCompat` is not satisfied
--> rust/stackable-cockpit/src/utils/templating.rs:37:10
|
37 | .with_context(|err| tera::Error::message(format!("Failed to create bcrypt hash: {err}")))
| ^^^^^^^^^^^^ the trait `ErrorCompat` is not implemented for `tera::Error`
|
note: there are multiple different versions of crate `snafu` in the dependency graph
--> /home/sbernauer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/snafu-0.9.1/src/lib.rs:1184:1
|
1184 | pub trait ErrorCompat {
| ^^^^^^^^^^^^^^^^^^^^^ this is the expected trait
|
::: /home/sbernauer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/snafu-0.8.9/src/lib.rs:1205:1
|
1205 | pub trait ErrorCompat {
| --------------------- this is the trait that was imported
|
::: /home/sbernauer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/snafu-0.6.10/src/lib.rs:474:1
|
474 | pub trait ErrorCompat {
| --------------------- this is the trait that was imported
= help: you can use `cargo tree` to explore your dependency tree
= help: the following other types implement trait `ErrorCompat`:
&'a E
Box<E>
BucketError
ConnectionError
ConvertObjectError
CrdEstablishedError
DurationParseError
FlaskAppConfigWriterError
and 89 others
note: required by a bound in `snafu::ResultExt::with_context`
--> /home/sbernauer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/snafu-0.9.1/src/lib.rs:676:21
|
672 | fn with_context<F, C, E2>(self, context: F) -> Result<T, E2>
| ------------ required by a bound in this associated function
...
676 | E2: Error + ErrorCompat;
| ^^^^^^^^^^^ required by this bound in `ResultExt::with_context`
For more information about this error, try `rustc --explain E0277`.
error: could not compile `stackable-cockpit` (lib) due to 2 previous errors
| #[snafu(display("failed to create Kubernetes client"))] | ||
| KubeClientCreate { source: kube::error::Error }, | ||
| KubeClientCreate { | ||
| #[snafu(source(from(kube::error::Error, Box::new)))] |
Member
There was a problem hiding this comment.
Curious why we have to add so much noise when it used to just work.
Member
Author
There was a problem hiding this comment.
New clippy lint warns more aggressive on big error enums.
when it used to just work.
It works before and after, but It's now failing quicker 🚀 Jokes aside, there is a reason that clippy lint exists and I could either silence it in multiple places or just fix the underlying issue by boxing big errors (claude did the repetitive work)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Definition of Done Checklist
Author
Reviewer
Acceptance